	<?php $this->load->view('admin/partials/show_menu'); ?>
	<?php 
		$ci = &get_instance();
		$showStatus = showStatusDataConfig();
	?>
	<h3>Shows &raquo; <?php echo ucfirst($this->uri->segment(4,''));?></h3>
	<?php //$buttons = array('buttons'=>array('add#show_add();') );?>
	<?php //$this->load->view('admin/partials/buttons', $buttons ); ?>
	
	<div class="clrboth"></div>
	
	<?php $this->load->view('admin/show/search_partial' ); ?>
	<div class="clrboth"></div>
	
	<table border="0" class="table-list">
		<thead>
			<tr>
				<th>Account code</th>
				<th>Show ref</th>
				<th>Show name</th>
				<th>Artist</th>
				<th>Who bid</th>
				<th>Created date</th>
				<th>Status</th>
				<th><?php echo lang('dataman.manage'); ?></th>
			</tr>
		</thead>
		
		<tbody>
			<?php foreach( $items['items'] as $item ): ?>
			<?php 
				$USER = $ci->user_entity->init('id',$item->user_created_id);
				$SHOW = $ci->show_entity->init('id',$item->id);
				$numberBidShow = $SHOW->countHowManyUserBidThisShow() > 0 ? "( ".$SHOW->countHowManyUserBidThisShow()." )": '';
			?>
			<tr>
				<td><a href="javascript:void(0);" onclick="_openDialogUserInfo(<?php echo $USER->getId();?>)"><?php echo $USER->getAccCode(); ?></a></td>
				<td><a href="javascript:void(0);" onclick="_openDialogShowInfo(<?php echo $SHOW->getId();?>)"><?php echo $SHOW->getRefNo(); ?></a></td>
				<td><?php echo $SHOW->getName(); ?></td>
				<td><?php echo $SHOW->getArtist(); ?></td>
				<td><a href="<?php echo site_url("admin/dataman/show/bid/?show_id=".$SHOW->getId());?>" ><?php echo "View $numberBidShow"; ?></a></td>
				<td><?php echo sbxDateFormat($SHOW->getCreatedTime(),'d-M-Y'); ?></td>
				<td><?php echo $showStatus[$SHOW->getStatus()];?></td>
				<td>
					<?php 
						echo form_dropdown( 'show_status',
											$options = $showStatus,
											$selected = array($SHOW->getStatus()),
											"id='show_status' onchange='change_show_status(this.value,{$SHOW->id});' class='no-uniform'"
										);
					?>
					&nbsp;|&nbsp;
					<a href="javascript:void(0);" onclick="_edit(<?php echo $SHOW->getId();?>)"><?php echo lang('dataman.edit');?></a>
					&nbsp;|&nbsp;
					<a href="javascript:void(0);" onclick="_delete(<?php echo $SHOW->getId();?>)" ><?php echo lang('dataman.delete');?></a>
				</td>
			</tr>
			<?php endforeach; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="8">
					<div class="inner"><?php echo $items['pagination']['links']; ?></div>
				</td>
			</tr>
		</tfoot>
	</table>


